package net.lab1024.sa.admin.module.app.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import net.lab1024.sa.admin.module.app.req.AppOrderListReq;
import net.lab1024.sa.admin.module.app.rsp.AppOrderListRsp;
import net.lab1024.sa.admin.module.app.rsp.AppUserBindListRsp;
import net.lab1024.sa.admin.module.app.service.AppUserService;
import net.lab1024.sa.base.common.domain.RequestUser;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.common.util.SmartRequestUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 *
 * @author guolong.zhang
 * @date 2025/02/11 10:17
 **/
@RestController
@Tag(name = "app-用户")
@RequestMapping("app")
public class AppUserController {

    @Autowired
    private AppUserService appUserService;

    @Operation(summary = "已绑娃娃列表查询")
    @PostMapping("/user/bind/list")
    public ResponseDTO<List<AppUserBindListRsp>> userBindList() {
        RequestUser requestUser = SmartRequestUtil.getRequestUser();
        return ResponseDTO.ok(appUserService.userBindList(requestUser));
    }
}
